{include file="public/header" /}
<style type="text/css">.gray-bg {
    background: #fff;
}

.wrapper {
    padding: 0px;
}</style>
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="row">
        <form class="form-horizontal" method="post">
            <div class="col-sm-12">
                <div class="ibox-content">

                    <!--发帖系统用户-1-->
                    <input class="form-control" type="hidden" id="member_id" name="member_id" value="-1"/>
                    <!--系统消息0-->
                    <input class="form-control" type="hidden" id="type" name="type" value="0"/>
                    <!--关联用户-->
                    <input class="form-control" type="hidden" id="relation_member_id" name="relation_member_id" value="0"/>

                    <div class="form-group">
                        <label class="col-sm-2 control-label">会员群体：</label>
                        <div class="col-sm-9">
                            <select id="choose" name="choose" class="form-control">
                                <option value="1" {if (isset($data.receive_member_id) && $data.receive_member_id eq -1) || empty($data.receive_member_id)} selected="selected"{/if}>所有会员</option>
                                <option value="2"  {if isset($data.receive_member_id) && $data.receive_member_id neq -1} selected="selected" {/if}>指定会员</option>

                            </select>
                        </div>
                    </div>

                    <div id="receive_member" class="form-group" {if (isset($data.receive_member_id) && $data.receive_member_id eq -1) || empty($data.receive_member_id)}style="display:none;"{/if}>
                        <label class="col-sm-2 control-label">会员id：</label>
                        <div class="col-sm-9">
                            <input class="form-control" type="text" id="receive_member_id" name="receive_member_id"
                                   value="{$data.receive_member_id|default='-1'}"/>
                        </div>
                    </div>


                    <div class="form-group">
                        <label class="col-sm-2 control-label">内容：</label>
                        <div class="col-sm-9">
                            <textarea id="content" class="form-control editor" name="content"  cols="30" rows="10">{$data.content|default=''}</textarea>
                        </div>
                    </div>

                </div>
            </div>
            <input type="hidden" name="id" value="{$data.id|default=0}"/>
        </form>
    </div>
</div>
{include file="public/footer" /}
<script type="text/javascript" src="__STYLE__/admin/js/area.js?ver=20200522"></script>
{load href="__STYLE__/admin/plugins/iCheck/icheck.min.js"}
{load href="__STYLE__/admin/plugins/iCheck/custom.css"}
<script src="__STYLE__/trumbowyg/trumbowyg.js"></script>
<script src="__STYLE__/trumbowyg/langs/fr.js"></script>
<script src="__STYLE__/trumbowyg/plugins/upload/trumbowyg.upload.js"></script>
<link rel="stylesheet" href="__STYLE__/trumbowyg/design/css/trumbowyg.css">
<script src="__STYLE__/trumbowyg/plugins/base64/trumbowyg.base64.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".i-checks").iCheck({
            checkboxClass: "icheckbox_square-green",
            radioClass: "iradio_square-green",
        });
    });


    $('#content').trumbowyg({

        lang: 'en',

        closable: true,

        mobile: true,

        fixedBtnPane: true,

        fixedFullWidth: true,

        semantic: true,

        resetCss: true,

        autoAjustHeight: true,

        autogrow: true

    });
    $("#choose").change(function () {
        var choose_val = $(this).val();
        if(choose_val==1){
            $("#receive_member_id").val(-1);
            $("#receive_member").hide();
        }else{
            $("#receive_member_id").val('');
            $("#receive_member").show();
        }
    });

</script>
{include file="public/bottom" /}